<template>
  <div class="stat-card white task-detail-wrapper">
    <div class="task-detail-card">
      <div class="arrow-border"></div>
      <div class="arrow-fill"></div>
      <div class="task-info">
        <div class="task-row">
          <span class="task-label">
            <schedule-outlined />
            常态化任务：
          </span>
          <span class="task-value">{{ data.regularTasks }}</span>
        </div>
        <div class="task-row">
          <span class="task-label">
            <file-outlined />
            阶段性任务：
          </span>
          <span class="task-value">{{ data.phaseTasks }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
import { ScheduleOutlined, FileOutlined } from '@ant-design/icons-vue'

// 定义任务数据
interface TaskData {
  regularTasks: number
  phaseTasks: number
}

// 设置默认值
const props = withDefaults(defineProps<{
  data?: TaskData
}>(), {
  data: () => ({
    regularTasks: 327,
    phaseTasks: 13
  })
})
</script>

<style scoped>
.task-detail-wrapper {
  background: transparent !important;
  box-shadow: none !important;
  cursor: default !important;
  position: relative;
  padding: 0;
}

.task-detail-wrapper:hover {
  transform: none !important;
  box-shadow: none !important;
}

.task-detail-card {
  background: white;
  border-radius: 8px;
  border: 1px solid #85aae5;
  box-shadow: none;
  z-index: 10;
  width: 100%;
  height: 100%;
  position: relative;
}

.task-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height:100%;
}

.task-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 4px;
}

.task-label {
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}

.task-value {
  color: #3370ff;
  font-weight: bold;
  font-size: 15px;
}

.arrow-border {
  position: absolute;
  left: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid #85aae5;
  z-index: 10;
}

.arrow-fill {
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-right: 8px solid white;
  z-index: 11;
}

:deep(.anticon-schedule),
:deep(.anticon-file) {
  color: #85aae5;
  font-size: 18px;
}
</style> 